package cn.yllr.tomgxianghui.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class MyMvcConfig implements WebMvcConfigurer {
    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
        registry.addViewController("/login.html").setViewName("login");
        registry.addViewController("/register.html").setViewName("register");
        registry.addViewController("/user_identify.html").setViewName("user_center/user_identify");
        registry.addViewController("/user_main.html").setViewName("user_center/user_main");
        registry.addViewController("/user_message.html").setViewName("user_center/user_message");
//        registry.addViewController("/user_order.html").setViewName("user_center/user_order");
//        registry.addViewController("/user_account.html").setViewName("user_center/user_account");
        registry.addViewController("/order_detail.html").setViewName("user_center/order_detail");
//        registry.addViewController("/user_cook.html").setViewName("user_center/user_cook");
//        registry.addViewController("/user_appointment.html").setViewName("user_center/user_appointment");
//        registry.addViewController("/user_selectOrder.html").setViewName("user_center/user_selectOrder");
//        registry.addViewController("/user_pay.html").setViewName("user_center/user_pay");
    }

//    @Override
//    public void addInterceptors(InterceptorRegistry registry) {
//        registry.addInterceptor(new LoginHandlerInterceptor()).addPathPatterns("/**")
//                .excludePathPatterns("/index", "/", "/css/**", "/js/**", "/images/**","/vendor/**","/fonts/**");  //给静态资源排除拦截器
//
//    }
}


